home *** CD-ROM | disk | FTP | other *** search
/ Ultra Gameplayers 101 / Ultra Game Players Magazine, No. 101 - September 1997 (Imagine Publishing, Inc.)(1997).iso / pc / new_ugp.dxr / 00213.ls < prev    next >
Encoding:
Text File  |  1997-07-10  |  2.3 KB  |  100 lines

  1. on DoGame currGame
  2.   if objectp(currGame) then
  3.     DoVideo(currGame)
  4.     DoImage(currGame)
  5.     DoText(currGame)
  6.     DoTitleBar(currGame)
  7.     DoDemo(currGame)
  8.     updateStage()
  9.   end if
  10. end
  11.  
  12. on DoVideo optionData
  13.   set videoDisplay to the videoDisplay of the currMenu of GetGlobal(#gTitleObject)
  14.   if not objectp(videoDisplay) then
  15.     return 0
  16.   end if
  17.   set newVideo to the number of member the movie of optionData
  18.   if newVideo > 0 then
  19.     init(videoDisplay, newVideo)
  20.     return 1
  21.   else
  22.     put "no video"
  23.     clear(videoDisplay)
  24.     return 0
  25.   end if
  26. end
  27.  
  28. on DoImage optionData
  29.   set imageDisplay to the imageDisplay of the currMenu of GetGlobal(#gTitleObject)
  30.   if not objectp(imageDisplay) then
  31.     return 0
  32.   end if
  33.   set newImage to the number of member the image of optionData
  34.   if newImage > 0 then
  35.     init(imageDisplay, newImage)
  36.     return 1
  37.   else
  38.     clear(imageDisplay)
  39.     return 0
  40.   end if
  41. end
  42.  
  43. on DoText optionData
  44.   set textDisplay to the textDisplay of the currMenu of GetGlobal(#gTitleObject)
  45.   if not objectp(textDisplay) then
  46.     return 0
  47.   end if
  48.   set newText to the description of optionData
  49.   if newText = "-" then
  50.     set newText to the tag of optionData
  51.   end if
  52.   if newText <> "-" then
  53.     init(textDisplay, newText)
  54.     return 1
  55.   else
  56.     clear(textDisplay)
  57.     return 0
  58.   end if
  59. end
  60.  
  61. on DoTitleBar optionData
  62.   set titleBar to the titleBar of the currMenu of GetGlobal(#gTitleObject)
  63.   if the number of member titleBar <= 0 then
  64.     return 0
  65.   end if
  66.   set newText to the name of optionData
  67.   if newText <> "-" then
  68.     set the text of member titleBar to newText
  69.     return 1
  70.   else
  71.     set the text of member titleBar to " "
  72.     return 0
  73.   end if
  74. end
  75.  
  76. on DoDemo optionData
  77.   set demoButton to the demoButton of the currMenu of GetGlobal(#gTitleObject)
  78.   if not objectp(demoButton) then
  79.     return 0
  80.   end if
  81.   set platformOK to 0
  82.   if the platform contains "Macintosh" then
  83.     if the category of optionData = "Macintosh" then
  84.       set platformOK to 1
  85.     end if
  86.   else
  87.     if the category of optionData = "PC" then
  88.       set platformOK to 1
  89.     end if
  90.   end if
  91.   put "platform check:", the platform, the category of optionData, platformOK
  92.   set newDemo to the filepath of optionData
  93.   set newURL to the url of optionData
  94.   if ((newDemo <> "-") or (newURL <> "-")) and platformOK then
  95.     init(demoButton, newDemo, newURL)
  96.   else
  97.     clear(demoButton)
  98.   end if
  99. end
  100.